![]() |
ALMaSS
1.0
The Animal, Landscape and Man Simulation System
|
The class that handles all the population lists for hares. More...
#include <hare_all.h>
Public Member Functions | |
THare_Population_Manager (Landscape *L) | |
This is the constructor for the hare population manager. More... | |
virtual | ~THare_Population_Manager (void) |
THare_Population_Manager destructor. More... | |
virtual void | TheAOROutputProbe () |
Output method. More... | |
void | CreateObjects (int ob_type, TAnimal *pvo, void *null, struct_Hare *data, int number) |
Method used to create new hares. More... | |
double | GetRMR (int a_age, double a_size) |
Returns the RMR given a specific age and mass. More... | |
int | GetHareRefNum () |
Get the next ID number available. More... | |
double | GetMaxDailyGrowthEnergy (int a_age) |
double | GetMaxDailyGrowthEnergyP (int a_age) |
Get the maximum daily energy needed for growth for this a_age for use in protein construction. More... | |
double | GetMaxDailyGrowthEnergyF (int a_age) |
Get the maximum daily energy needed for growth for this a_age for use in fat construction. More... | |
double | GetGrowthEfficiency (int a_age) |
Get the growth efficiency for this a_age. More... | |
double | GetGrowthEfficiencyP (int a_age) |
Get the growth efficiency for this a_age for creating protein. More... | |
double | GetGrowthEfficiencyF (int a_age) |
Get the growth efficiency for this a_age for creating fat. More... | |
double | GetKJperM (int a_size) |
Get the cost of moving 1m in KJ dependent upon mass (. More... | |
int | GetLitterSize (int noLitters) |
Returns the litter size. More... | |
void | AddHareDensity (int x, int y, Hare_Object a_type) |
Density function - adds one to the density in the square containing by x,y. Each square is 256x256m in size. More... | |
void | SubtractHareDensity (int x, int y, Hare_Object a_type) |
Density function - subtracts one from the density in the square containing by x,y. Each square is 256x256m in size. More... | |
int | GetInfantDensity (int x, int y) |
Density function - returns the density of infants in the square containing by x,y. Each square is 256x256m in size. More... | |
int | GetYoungDensity (int x, int y) |
Density function - returns the density of young in the square containing by x,y. Each square is 256x256m in size. More... | |
int | GetJuvenileDensity (int x, int y) |
Density function - returns the density of juveniles in the square containing by x,y. Each square is 256x256m in size. More... | |
int | GetMaleDensity (int x, int y) |
Density function - returns the density of males in the square containing by x,y. Each square is 256x256m in size. More... | |
int | GetFemaleDensity (int x, int y) |
Density function - returns the density of females in the square containing by x,y. Each square is 256x256m in size. More... | |
int | GetTotalDensity (int x, int y) |
Density function - returns the density of all hares in the square containing by x,y. Each square is 256x256m in size. More... | |
int | GetAdultDensity (int x, int y) |
Density function - returns the density of adults in the square containing by x,y. Each square is 256x256m in size. More... | |
int | GetDelayedAdultDensity (int x, int y) |
Density function - returns the density of adults in the square containing by x,y, but for last year at this time. Each square is 256x256m in size. More... | |
double | GetInterference (int h) |
Return the proportion of time used in communicating with con-specifics. More... | |
double | GetPolyFood (int a_poly) |
Get stored polygon food quality. More... | |
void | SetPolyFood (int a_poly, double a_value) |
Set polygon food quality. More... | |
void | BodyBurdenOut (int a_year, int a_day, double a_bb, double a_mgkg) |
BodyBurden output. More... | |
![]() | |
Population_Manager (Landscape *L) | |
virtual | ~Population_Manager (void) |
void | SetNoProbes (int a_pn) |
unsigned | GetLiveArraySize (int a_listindex) |
Gets the number of 'live' objects for a list index in the TheArray. More... | |
void | IncLiveArraySize (int a_listindex) |
Increments the number of 'live' objects for a list index in the TheArray. More... | |
virtual void | Catastrophe (int) |
unsigned int | FarmAnimalCensus (unsigned int a_farm, unsigned int a_typeofanimal) |
char * | SpeciesSpecificReporting (int a_species, int a_time) |
char * | ProbeReport (int a_time) |
char * | ProbeReportTimed (int a_time) |
void | ImpactProbeReport (int a_Time) |
bool | BeginningOfMonth () |
void | LOG (const char *fname) |
int | SupplyStepSize () |
int | SupplySimW () |
int | SupplySimH () |
virtual void | Run (int NoTSteps) |
virtual float | Probe (int ListIndex, probe_data *p_TheProbe) |
virtual void | ImpactedProbe () |
int | SupplyListNameLength () |
TAnimal * | SupplyAnimalPtr (int a_index, int a_animal) |
Returns the pointer indexed by a_index and a_animal. Note NO RANGE CHECK. More... | |
unsigned | SupplyListIndexSize () |
unsigned | SupplyListSize (unsigned listindex) |
bool | CheckXY (int l, int i) |
Debug method to test for out of bounds coordinates. More... | |
const char * | SupplyListName (int i) |
bool | IsLast (unsigned listindex) |
int | SupplyState (unsigned listindex, unsigned j) |
virtual void | SupplyLocXY (unsigned listindex, unsigned j, int &x, int &y) |
const char * | SupplyStateNames (int i) |
unsigned | SupplyStateNamesLength () |
virtual void | DisplayLocations () |
int | ProbeFileInput (char *p_Filename, int p_ProbeNo) |
TAnimal * | FindClosest (int x, int y, unsigned Type) |
bool | OpenTheRipleysOutputProbe (string a_NWordFilename) |
void | OpenTheAOROutputProbe (string a_AORFilename) |
bool | OpenTheMonthlyRipleysOutputProbe () |
bool | OpenTheReallyBigProbe () |
virtual void | TheReallyBigOutputProbe () |
void | CloseTheMonthlyRipleysOutputProbe () |
virtual void | CloseTheRipleysOutputProbe () |
virtual void | CloseTheReallyBigOutputProbe () |
TTypesOfPopulation | GetPopulationType () |
int | GetSeasonNumber () |
Get the season number. More... | |
void | LamdaDeath (int x, int y) |
void | LamdaBirth (int x, int y) |
void | LamdaBirth (int x, int y, int z) |
void | LamdaClear () |
void | LamdaDumpOutput () |
virtual int | SupplyPegPosx (int) |
virtual int | SupplyPegPosy (int) |
virtual int | SupplyCovPosx (int) |
virtual int | SupplyCovPosy (int) |
virtual bool | OpenTheFledgelingProbe () |
virtual bool | OpenTheBreedingPairsProbe () |
virtual bool | OpenTheBreedingSuccessProbe () |
virtual void | BreedingPairsOutput (int) |
virtual int | TheBreedingFemalesProbe (int) |
virtual int | TheFledgelingProbe () |
virtual void | BreedingSuccessProbeOutput (double, int, int, int, int, int, int, int) |
virtual int | TheBreedingSuccessProbe (int &, int &, int &, int &, int &, int &) |
virtual void | FledgelingProbeOutput (int, int) |
virtual void | TheGeneticProbe (unsigned, int, unsigned &) |
virtual void | GeneticsResultsOutput (FILE *, unsigned) |
Public Attributes | |
double | m_JuvMortRate |
Input variable - Juvenile mortality rate. More... | |
double | m_AdultMortRate |
Input variable - Adult mortality rate. More... | |
double | m_YoungMortRate |
Input variable - Young mortality rate. More... | |
float | m_GoodYearBadYear |
Variable for adding stochasticity. More... | |
double | m_DMWeight [5001] |
Array for storing minimum acceptable size with age. More... | |
int | m_HareThresholdDD |
Input variable - Threshold density dependence level. More... | |
![]() | |
int | IndexArrayX [5][10000] |
probe_data * | TheProbe [100] |
int | SimH |
int | SimW |
unsigned | SimHH |
unsigned | SimWH |
char | m_SimulationName [255] |
bool | ProbesSet |
Landscape * | m_TheLandscape |
Protected Member Functions | |
void | Init () |
Sets up data structures and calculations prior to starting simulation. More... | |
void | CalcLitterSize (double mean, double SD, int litter) |
virtual void | DoFirst () |
The first method called of the new time-step. More... | |
virtual void | DoLast () |
The last method called before the new time-step starts. More... | |
virtual void | DoAlmostLast () |
Called before clean-up of dead objects. More... | |
void | POMOutputs () |
This method is called to dump the information needed for POM approaches. More... | |
void | MRROutputs () |
Special probe for data to be used in mark-release-recapture simulations. More... | |
virtual void | TheRipleysOutputProbe (FILE *a_prb) |
Standard spatial output. More... | |
void | ExtraPopMort (void) |
An extra global mortality More... | |
void | Hunting (void) |
void | HuntingGrid (void) |
void | HuntingDifferentiatedBeetleBankArea (void) |
virtual void | Catastrophe () |
Annual global change in population numbers. More... | |
![]() | |
virtual bool | StepFinished () |
Overrides the population manager StepFinished - there is no chance that hunters do not finish a step behaviour. More... | |
virtual void | DoBefore () |
virtual void | DoAfter () |
void | EmptyTheArray () |
Removes all objects from the TheArray by deleting them and clearing TheArray. More... | |
void | SortX (unsigned Type) |
void | SortXIndex (unsigned Type) |
void | SortY (unsigned Type) |
void | SortState (unsigned Type) |
void | SortStateR (unsigned Type) |
unsigned | PartitionLiveDead (unsigned Type) |
void | Shuffle_or_Sort (unsigned Type) |
void | Shuffle (unsigned Type) |
Protected Attributes | |
int | m_RefNums |
The last hare ID used More... | |
int | m_shot |
Hunting Bag. More... | |
double | m_MortStochast |
Stochasticity around mortality parameters More... | |
double | m_Interference [2500] |
Array storing density-dependence effect with density More... | |
int | m_DensityMap [8][200][200] |
Array storing densities measured in different ways More... | |
int | m_variableDD |
Used to vary the density dependence each year More... | |
int | m_LitterSize [12][7] |
Storage for litter size distributions (not used in default config) More... | |
double * | m_PolyFood |
Temporary storage More... | |
double | m_RMR [2][366] |
Precalculated RMR with age More... | |
double | m_MaxDailyGrowthEnergy [5001] |
Precalculated max growth energy requirement with size More... | |
double | m_GrowthEfficiency [5001] |
Precalculated growth efficiency with size More... | |
double | m_MaxDailyGrowthEnergyP [5001] |
Precalculated max growth energy requirement with size for protein More... | |
double | m_MaxDailyGrowthEnergyF [5001] |
Precalculated max growth energy requirement with size for fat More... | |
double | m_GrowthEfficiencyP [5001] |
Precalculated growth efficiency for protein with size More... | |
double | m_GrowthEfficiencyF [5001] |
Precalculated growth efficiency for fat with size More... | |
double | m_KJperM [7001] |
Precalculated cost of locomotion - KJ per m per kg More... | |
MRR_Data * | m_OurMRRData |
Data structure for MarkReleaseRecapture expts More... | |
FILE * | BodyBurdenPrb |
![]() | |
vector< unsigned > | m_LiveArraySize |
int | m_NoProbes |
AOR_Probe * | m_AOR_Probe |
FILE * | m_GeneticsFile |
FILE * | m_AlleleFreqsFile |
FILE * | m_EasyPopRes |
const char * | StateNames [100] |
int | m_catastrophestartyear |
int | m_StepSize |
vector< TListOfAnimals > | TheArray |
unsigned | StateNamesLength |
const char * | m_ListNames [32] |
unsigned | m_ListNameLength |
FILE * | TestFile |
FILE * | TestFile2 |
unsigned | BeforeStepActions [12] |
int | m_SeasonNumber |
Holds the season number. Used when running goose and hunter sims. More... | |
TTypesOfPopulation | m_population_type |
ofstream * | AOROutputPrb |
FILE * | RipleysOutputPrb |
FILE * | RipleysOutputPrb1 |
FILE * | RipleysOutputPrb2 |
FILE * | RipleysOutputPrb3 |
FILE * | RipleysOutputPrb4 |
FILE * | RipleysOutputPrb5 |
FILE * | RipleysOutputPrb6 |
FILE * | RipleysOutputPrb7 |
FILE * | RipleysOutputPrb8 |
FILE * | RipleysOutputPrb9 |
FILE * | RipleysOutputPrb10 |
FILE * | RipleysOutputPrb11 |
FILE * | RipleysOutputPrb12 |
FILE * | ReallyBigOutputPrb |
long int | lamdagrid [2][257][257] |
The class that handles all the population lists for hares.
THare_Population_Manager::THare_Population_Manager | ( | Landscape * | L | ) |
This is the constructor for the hare population manager.
It simply dumps unnecessary lists from the main population record (TheArray), then calls Init which initialises the variables needed before running.
References Init(), and Population_Manager::TheArray.
|
virtual |
THare_Population_Manager destructor.
References BodyBurdenPrb, m_OurMRRData, m_PolyFood, and THare::m_vegPalatability.
|
inline |
Density function - adds one to the density in the square containing by x,y. Each square is 256x256m in size.
References m_DensityMap.
Referenced by DoFirst(), and Hare_Juvenile::st_Dispersal().
|
inline |
BodyBurden output.
References BodyBurdenPrb.
Referenced by Hare_Male::InternalPesticideHandlingAndResponse(), and Hare_Female::InternalPesticideHandlingAndResponse().
|
protected |
Calculates probabilities out of 10000 that a litter of a certain size is obtained.
Assumes a normal distribution around mean and SD. NB - will give problems if the SD==0.0
References m_LitterSize.
Referenced by Init().
|
protectedvirtual |
Annual global change in population numbers.
Remove or add hares to the population on a certain day and year - used for theoretical scenarios & testing
Reimplemented from Population_Manager.
References cfg_pm_eventfrequency, cfg_pm_eventsize, TAnimal::Dying(), Population_Manager::GetLiveArraySize(), hob_Female, hob_Juvenile, hob_Male, Population_Manager::m_catastrophestartyear, Population_Manager::m_TheLandscape, random(), Landscape::SupplyDayInYear(), Landscape::SupplyYearNumber(), Population_Manager::TheArray, and CfgInt::value().
void THare_Population_Manager::CreateObjects | ( | int | ob_type, |
TAnimal * | pvo, | ||
void * | null, | ||
struct_Hare * | data, | ||
int | number | ||
) |
Method used to create new hares.
Creates new hare objects that have just been born, or because of changes of life-stage require the creation of a new object. Input data is passed in the struct_Hare
This is a very important method - each type of population manager has its own implementation. This is the method that must be called every time a new Hare object is created.
References Hare_Female::AddYoung(), struct_Hare::age, Population_Manager::GetLiveArraySize(), struct_Hare::HM, Population_Manager::IncLiveArraySize(), struct_Hare::L, struct_Hare::Mum, struct_Hare::RefNum, Hare_Infant::ReInit(), Hare_Young::ReInit(), Hare_Juvenile::ReInit(), Hare_Male::ReInit(), Hare_Female::ReInit(), THare::SetMum(), Hare_Infant::SetMum(), Hare_Infant::SetWeight(), Population_Manager::TheArray, Hare_Female::UpdateYoung(), struct_Hare::weight, struct_Hare::x, and struct_Hare::y.
Referenced by Hare_Female::GiveBirth(), Init(), Hare_Infant::st_NextStage(), Hare_Young::st_NextStage(), and Hare_Juvenile::st_NextStage().
|
protectedvirtual |
Called before clean-up of dead objects.
In this case this only applies hunting mortality. Needs to be done before objects are tidied up at the end of the time-step.
Reimplemented from Population_Manager.
References cfg_HareHuntingDate, cfg_HareHuntingType, Hunting(), HuntingDifferentiatedBeetleBankArea(), HuntingGrid(), Population_Manager::m_TheLandscape, Landscape::SupplyDayInYear(), and CfgInt::value().
|
protectedvirtual |
The first method called of the new time-step.
Does special start of step actions here. In this case optional changes to parameter values e.g. mortality rates, data outputs e.g. POMOutputs(), and clearing the forage food array.
Reimplemented from Population_Manager.
References AddHareDensity(), cfg_hare_adult_predation, cfg_hare_femalesterility, cfg_hare_firstyearsterility, cfg_hare_juvenile_predation, cfg_hare_young_predation, ExtraPopMort(), g_rand_uni, THare::GetAge(), Population_Manager::GetLiveArraySize(), hob_Female, m_AdultMortRate, m_DensityMap, m_GoodYearBadYear, m_JuvMortRate, m_MortStochast, m_PolyFood, Population_Manager::m_TheLandscape, m_variableDD, AnimalPosition::m_x, AnimalPosition::m_y, m_YoungMortRate, October, POMOutputs(), random(), Hare_Female::SetSterile(), Landscape::SupplyDayInYear(), Landscape::SupplyLargestPolyNumUsed(), Population_Manager::TheArray, CfgInt::value(), and CfgFloat::value().
|
protectedvirtual |
The last method called before the new time-step starts.
Called after EndStep and before the landscape turns for the next time-step.
Does special end of step actions here. In this case zeroing the density maps, optional debug and mark-release-recapture outputs
Reimplemented from Population_Manager.
References Population_Manager::DoLast(), m_DensityMap, and MRROutputs().
|
protected |
An extra global mortality
Like Catastrophe() this just kills hares but always on Jan 1st.
Used for POM testing only.
References TAnimal::Dying(), Population_Manager::GetLiveArraySize(), hob_Female, hob_Juvenile, hob_Male, Population_Manager::m_TheLandscape, random(), Landscape::SupplyDayInYear(), Landscape::SupplyYearNumber(), and Population_Manager::TheArray.
Referenced by DoFirst().
|
inline |
Density function - returns the density of adults in the square containing by x,y. Each square is 256x256m in size.
References hob_Female, hob_Male, and m_DensityMap.
Referenced by Hare_Juvenile::st_Dispersal(), Hare_Male::st_Foraging(), and Hare_Female::st_Foraging().
|
inline |
Density function - returns the density of adults in the square containing by x,y, but for last year at this time. Each square is 256x256m in size.
References m_DensityMap.
Referenced by Hare_Male::st_Foraging(), and Hare_Female::st_Foraging().
|
inline |
Density function - returns the density of females in the square containing by x,y. Each square is 256x256m in size.
References hob_Female, and m_DensityMap.
|
inline |
Get the growth efficiency for this a_age.
References m_GrowthEfficiency, Population_Manager::m_TheLandscape, and Landscape::Warn().
Referenced by Hare_Infant::st_Developing().
|
inline |
Get the growth efficiency for this a_age for creating fat.
References m_GrowthEfficiencyF, Population_Manager::m_TheLandscape, and Landscape::Warn().
Referenced by Hare_Juvenile::st_Developing(), Hare_Male::st_Developing(), and Hare_Female::st_Developing().
|
inline |
Get the growth efficiency for this a_age for creating protein.
References m_GrowthEfficiencyP, Population_Manager::m_TheLandscape, and Landscape::Warn().
Referenced by Hare_Young::st_Developing(), Hare_Juvenile::st_Developing(), Hare_Male::st_Developing(), and Hare_Female::st_Developing().
|
inline |
|
inline |
Density function - returns the density of infants in the square containing by x,y. Each square is 256x256m in size.
References hob_Infant, and m_DensityMap.
|
inline |
Return the proportion of time used in communicating with con-specifics.
Based on:
m_Interference[i]=exp(i*cfg_HareInterferenceConstant)
References m_Interference, Population_Manager::m_TheLandscape, and Landscape::Warn().
Referenced by Hare_Infant::BeginStep(), Hare_Young::BeginStep(), Hare_Juvenile::BeginStep(), Hare_Juvenile::st_Dispersal(), Hare_Juvenile::st_Foraging(), Hare_Male::st_Foraging(), and Hare_Female::st_Foraging().
|
inline |
Density function - returns the density of juveniles in the square containing by x,y. Each square is 256x256m in size.
References hob_Juvenile, and m_DensityMap.
|
inline |
Get the cost of moving 1m in KJ dependent upon mass (.
References m_KJperM, Population_Manager::m_TheLandscape, and Landscape::Warn().
Referenced by Hare_Infant::BeginStep(), Hare_Young::BeginStep(), Hare_Juvenile::BeginStep(), Hare_Male::BeginStep(), Hare_Female::BeginStep(), and Hare_Female::Init().
int THare_Population_Manager::GetLitterSize | ( | int | litter | ) |
Returns the litter size.
Uses a frequency distribution out of 0-9999 and 6 bins and returns one of the bins as the return based on a random number from 0-9999
References g_rand_uni, m_LitterSize, Population_Manager::m_TheLandscape, and Landscape::Warn().
|
inline |
Density function - returns the density of males in the square containing by x,y. Each square is 256x256m in size.
References hob_Male, and m_DensityMap.
|
inline |
Get the maximum daily energy needed for growth for this a_age
References m_MaxDailyGrowthEnergy, Population_Manager::m_TheLandscape, and Landscape::Warn().
Referenced by Hare_Female::DoLactation().
|
inline |
Get the maximum daily energy needed for growth for this a_age for use in fat construction.
References m_MaxDailyGrowthEnergyF, Population_Manager::m_TheLandscape, and Landscape::Warn().
Referenced by Hare_Juvenile::st_Developing(), Hare_Male::st_Developing(), and Hare_Female::st_Developing().
|
inline |
Get the maximum daily energy needed for growth for this a_age for use in protein construction.
References m_MaxDailyGrowthEnergyP, Population_Manager::m_TheLandscape, and Landscape::Warn().
Referenced by Hare_Infant::st_Developing(), Hare_Young::st_Developing(), Hare_Juvenile::st_Developing(), Hare_Male::st_Developing(), and Hare_Female::st_Developing().
|
inline |
Get stored polygon food quality.
References m_PolyFood.
Referenced by THare::ForageSquare(), and THare::ForageSquareP().
double THare_Population_Manager::GetRMR | ( | int | a_age, |
double | a_size | ||
) |
Returns the RMR given a specific age and mass.
RMR is weight dependent based on RMR=69.1*4.1868)w^0.808 (McNab 1988)
But affected by temperature. We assume that after 35days 1kg weight, that this effect is constant per kg
References g_RMRrainFactor, m_RMR, Population_Manager::m_TheLandscape, Landscape::SupplyRain(), Landscape::SupplyTemp(), and Landscape::Warn().
Referenced by THare::EnergyBalance(), THare::GetRMR(), Hare_Infant::st_Developing(), and Hare_Young::st_Foraging().
|
inline |
Density function - returns the density of all hares in the square containing by x,y. Each square is 256x256m in size.
References m_DensityMap.
Referenced by Hare_Infant::BeginStep(), Hare_Young::BeginStep(), Hare_Juvenile::BeginStep(), Hare_Male::BeginStep(), Hare_Female::BeginStep(), and HuntingGrid().
|
inline |
Density function - returns the density of young in the square containing by x,y. Each square is 256x256m in size.
References hob_Young, and m_DensityMap.
|
protected |
Takes a fixed proportion of the population (input variable), in the middle of the hunting season.
References cfg_HareHunting, g_rand_uni, TALMaSSObject::GetCurrentStateNo(), Population_Manager::GetLiveArraySize(), hob_Female, hob_Juvenile, hob_Male, hob_Young, m_shot, Hare_Juvenile::ON_Dead(), Hare_Male::ON_Dead(), Hare_Female::ON_Dead(), Population_Manager::TheArray, and CfgFloat::value().
Referenced by DoAlmostLast().
|
protected |
Differential hunting inside a specific area designated as beetlebank addition area. Takes a fixed proportion of the population (input variable for inside and outside), in the middle of the hunting season
References cfg_BeetleBankInvert, cfg_BeetleBankMaxX, cfg_BeetleBankMaxY, cfg_BeetleBankMinX, cfg_BeetleBankMinY, cfg_HareHunting, cfg_HareHuntingBeetleBankArea, g_rand_uni, Population_Manager::GetLiveArraySize(), hob_Foobar, hob_Juvenile, m_shot, APoint::m_x, APoint::m_y, THare::ON_Dead(), TAnimal::SupplyPoint(), Population_Manager::TheArray, CfgInt::value(), CfgFloat::value(), and CfgBool::value().
Referenced by DoAlmostLast().
|
protected |
Hunting version based on grid squares - hunting occurs only if there are enough hares in each grid square.
Density squares are 256x256m in size, so for each ca 1 square km we need 8x8 of these squares, if total numbers is greater than a threshold then we hunt.
References cfg_HareHunting, cfg_HareHuntingThreshold, g_rand_uni, TALMaSSObject::GetCurrentStateNo(), Population_Manager::GetLiveArraySize(), GetTotalDensity(), hob_Female, hob_Juvenile, hob_Male, m_shot, Hare_Juvenile::ON_Dead(), Hare_Male::ON_Dead(), Hare_Female::ON_Dead(), Population_Manager::SimH, Population_Manager::SimW, TAnimal::Supply_m_Location_x(), TAnimal::Supply_m_Location_y(), Population_Manager::TheArray, CfgInt::value(), and CfgFloat::value().
Referenced by DoAlmostLast().
|
protected |
Sets up data structures and calculations prior to starting simulation.
Creates some hares in semi-sensible places.
open the probe
Set up before step action sorts This determines how we handle the arrays between steps
Load State Names - these are just used to tell us what the animal is doing in the GUI
Loads a data file giving max daily growth at age together with cost of that growth per g. These are up to day 365. After 365 the cost is constant and assumes only fat is added
Calculates RMR based on Hacklander - these are the thermoneutral values
Ensure zeros in the density map!
Intitialise the Pattern Oriented Modelling output file
References struct_Hare::age, Population_Manager::BeforeStepActions, BodyBurdenPrb, CalcLitterSize(), cfg_FarmIntensiveness, cfg_FarmIntensivenessH, cfg_hare_peg_inertia, cfg_hare_StartingNo, cfg_HareInterferenceConstant, cfg_HareMortStochasticity, cfg_HareThresholdDD, cfg_HareWalkingPowerConst, cfg_littersize_mean1, cfg_littersize_mean10, cfg_littersize_mean11, cfg_littersize_mean12, cfg_littersize_mean2, cfg_littersize_mean3, cfg_littersize_mean4, cfg_littersize_mean5, cfg_littersize_mean6, cfg_littersize_mean7, cfg_littersize_mean8, cfg_littersize_mean9, cfg_littersize_SD1, cfg_littersize_SD10, cfg_littersize_SD11, cfg_littersize_SD12, cfg_littersize_SD2, cfg_littersize_SD3, cfg_littersize_SD4, cfg_littersize_SD5, cfg_littersize_SD6, cfg_littersize_SD7, cfg_littersize_SD8, cfg_littersize_SD9, cfg_min_growth_attain, cfg_ReallyBigOutput_used, cfg_RipleysOutput_used, cfg_RMRrainFactor, cfg_VegHeightForageReduction, CreateObjects(), g_FarmIntensiveness, g_FarmIntensivenessH, g_hare_peg_inertia, g_msg, g_RMRrainFactor, g_VegHeightForageReduction, struct_Hare::HM, struct_Hare::L, THare::loadVegPalatability(), m_DensityMap, m_DMWeight, m_GrowthEfficiency, m_GrowthEfficiencyF, m_GrowthEfficiencyP, m_HareThresholdDD, m_Interference, m_KJperM, Population_Manager::m_ListNameLength, Population_Manager::m_ListNames, m_MaxDailyGrowthEnergy, m_MaxDailyGrowthEnergyF, m_MaxDailyGrowthEnergyP, m_MortStochast, m_OurMRRData, m_PolyFood, Population_Manager::m_population_type, m_RefNums, m_RMR, Population_Manager::m_SimulationName, Population_Manager::m_TheLandscape, m_variableDD, Population_Manager::OpenTheReallyBigProbe(), Population_Manager::OpenTheRipleysOutputProbe(), random(), Population_Manager::ReallyBigOutputPrb, struct_Hare::RefNum, Population_Manager::SimH, Population_Manager::SimW, Population_Manager::StateNames, Landscape::SupplyElementType(), Landscape::SupplyLargestPolyNumUsed(), tohs_Developing, tohs_Dispersal, tohs_Dying, tohs_Foraging, tohs_InitialState, tohs_NextStage, tohs_ReproBehaviour, tohs_Resting, tohs_Running, tole_AmenityGrass, tole_BareRock, tole_Building, tole_BuiltUpWithParkland, tole_Carpark, tole_Churchyard, tole_Coast, tole_Copse, tole_FishFarm, tole_Freshwater, tole_HeritageSite, tole_MetalledPath, tole_Parkland, tole_Pond, tole_River, tole_Saltwater, tole_SandDune, tole_Stream, tole_UrbanNoVeg, tole_UrbanPark, TOP_Hare, CfgInt::value(), CfgFloat::value(), CfgBool::value(), MapErrorMsg::Warn(), Landscape::Warn(), WARN_FILE, struct_Hare::weight, struct_Hare::x, and struct_Hare::y.
Referenced by THare_Population_Manager().
|
protected |
Special probe for data to be used in mark-release-recapture simulations.
What this has to do is to print to the MMR file the occurence if any of each animal that ever existed between two dates.
If that animal has been counted before then add to that animals line, otherwise create a new line.
Requires that each hare has a unique ID number.
NB this counts the population with zero error.
References MRR_Data::AddEntry(), cfg_MRR1, cfg_MRR2, cfg_MRR3, cfg_MRR4, cfg_MRR5, cfg_MRR_FirstYear, cfg_MRR_LastYear, Population_Manager::GetLiveArraySize(), THare::GetRefNum(), hob_Female, hob_Juvenile, hob_Male, MRR_Data::IncTrapping(), m_OurMRRData, Population_Manager::m_TheLandscape, MRR_Data::OutputToFile(), Landscape::SupplyDayInYear(), Landscape::SupplyYearNumber(), Population_Manager::TheArray, and CfgInt::value().
Referenced by DoLast().
|
protected |
This method is called to dump the information needed for POM approaches.
The data dumped is variable dependent upon what is needed at the time. Contents vary from version to version.
References THare::GetAge(), Population_Manager::GetLiveArraySize(), THare::GetTotalWeight(), hob_Female, hob_Infant, hob_Juvenile, hob_Male, hob_Young, m_shot, Population_Manager::m_TheLandscape, Landscape::SupplyDayInYear(), Population_Manager::TheArray, and Landscape::Warn().
Referenced by DoFirst().
|
inline |
Set polygon food quality.
References m_PolyFood.
Referenced by THare::ForageSquare(), and THare::ForageSquareP().
|
inline |
Density function - subtracts one from the density in the square containing by x,y. Each square is 256x256m in size.
References m_DensityMap.
Referenced by Hare_Juvenile::st_Dispersal().
|
virtual |
Output method.
Reimplemented from Population_Manager.
References AOR_Probe::DoProbe(), hob_Female, and Population_Manager::m_AOR_Probe.
|
protectedvirtual |
Standard spatial output.
Special probe for data to be used in spatial statistics
Reimplemented from Population_Manager.
References Population_Manager::GetLiveArraySize(), hob_Female, Population_Manager::m_TheLandscape, TAnimal::Supply_m_Location_x(), TAnimal::Supply_m_Location_y(), Landscape::SupplySimAreaHeight(), Landscape::SupplySimAreaWidth(), and Population_Manager::TheArray.
|
protected |
Probe for pestidcide output/testing
Referenced by BodyBurdenOut(), Init(), and ~THare_Population_Manager().
double THare_Population_Manager::m_AdultMortRate |
Input variable - Adult mortality rate.
Referenced by DoFirst(), and THare::WasPredated().
|
protected |
Array storing densities measured in different ways
Referenced by AddHareDensity(), DoFirst(), DoLast(), GetAdultDensity(), GetDelayedAdultDensity(), GetFemaleDensity(), GetInfantDensity(), GetJuvenileDensity(), GetMaleDensity(), GetTotalDensity(), GetYoungDensity(), Init(), and SubtractHareDensity().
double THare_Population_Manager::m_DMWeight[5001] |
Array for storing minimum acceptable size with age.
Referenced by Init().
float THare_Population_Manager::m_GoodYearBadYear |
Variable for adding stochasticity.
Referenced by DoFirst().
|
protected |
Precalculated growth efficiency with size
Referenced by GetGrowthEfficiency(), and Init().
|
protected |
Precalculated growth efficiency for fat with size
Referenced by GetGrowthEfficiencyF(), and Init().
|
protected |
Precalculated growth efficiency for protein with size
Referenced by GetGrowthEfficiencyP(), and Init().
int THare_Population_Manager::m_HareThresholdDD |
Input variable - Threshold density dependence level.
Referenced by Hare_Young::BeginStep(), Hare_Juvenile::BeginStep(), Init(), Hare_Juvenile::st_Foraging(), Hare_Male::st_Foraging(), and Hare_Female::st_Foraging().
|
protected |
Array storing density-dependence effect with density
Referenced by GetInterference(), and Init().
double THare_Population_Manager::m_JuvMortRate |
Input variable - Juvenile mortality rate.
Referenced by Hare_Juvenile::BeginStep(), DoFirst(), and Hare_Juvenile::WasPredated().
|
protected |
Precalculated cost of locomotion - KJ per m per kg
Referenced by GetKJperM(), and Init().
|
protected |
Storage for litter size distributions (not used in default config)
Referenced by CalcLitterSize(), and GetLitterSize().
|
protected |
Precalculated max growth energy requirement with size
Referenced by GetMaxDailyGrowthEnergy(), and Init().
|
protected |
Precalculated max growth energy requirement with size for fat
Referenced by GetMaxDailyGrowthEnergyF(), and Init().
|
protected |
Precalculated max growth energy requirement with size for protein
Referenced by GetMaxDailyGrowthEnergyP(), and Init().
|
protected |
|
protected |
Data structure for MarkReleaseRecapture expts
Referenced by Init(), MRROutputs(), and ~THare_Population_Manager().
|
protected |
Temporary storage
Referenced by DoFirst(), GetPolyFood(), Init(), SetPolyFood(), and ~THare_Population_Manager().
|
protected |
The last hare ID used
Referenced by GetHareRefNum(), and Init().
|
protected |
|
protected |
Hunting Bag.
Referenced by Hunting(), HuntingDifferentiatedBeetleBankArea(), HuntingGrid(), and POMOutputs().
|
protected |
double THare_Population_Manager::m_YoungMortRate |
Input variable - Young mortality rate.
Referenced by Hare_Infant::BeginStep(), Hare_Young::BeginStep(), and DoFirst().